import axios from 'axios'

const service = axios.create({
  baseURL: 'http://vue-music.phpzhidao.com',
  timeout: 5000
})

service.interceptors.request.use(config => {
  return config
}, err => {
  console.error(err)
  return Promise.reject(err)
})

service.interceptors.response.use(response => {
  return response.data
}, err => {
  console.error(err)
  return Promise.reject(err)
})

export default service
